package uml.behavioral.responsibility_chain.ext;

/**
 * 职责链--具体请求处理者[中间处理者]
 * on 2023/2/1 14:42
 */
public class PriceHandler extends Handler {
    @Override
    Result handle(Request request, Standard standard) {
        if (request.getPrice() > standard.getMaxPrice())
            return new Result("不通过", standard.getPriceDesc());
        return nextHandler.handle(request, standard);
    }
}
